import 'package:flutter/material.dart';

class MyApp11 extends StatelessWidget {
  const MyApp11({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      // 导航条
      appBar: AppBar(
        title: const Text('堆叠组件',
            style: TextStyle(color: Colors.white, fontSize: 20)),
        backgroundColor: Colors.pink,
        centerTitle: true,
      ),
      // 主体区域
      body: Center(
        child: Stack(
          clipBehavior: Clip.none,
          alignment: AlignmentDirectional.center,
          children: [
            Container(
              width: 200,
              height: 200,
              color: Colors.cyan
            ),
            Positioned(
              top: -100,
              child: Image.asset('open_eyes.png'),
            ),
            const Icon(Icons.ad_units_outlined, size: 100,)
          ],
        )
      ),
    );
  }
}